package com.bg.api;

import lombok.Data;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.io.Serializable;

@Data
public class MongDataPageable implements Pageable, Serializable {
    private int pageNums = 1;
    private int pageSizes = 10;
    private Sort sort;

    @Override
    public int getPageNumber() {
        return getPageNums();
    }

    @Override
    public int getPageSize() {
        return getPageSizes();
    }

    @Override
    public int getOffset() {
        return (getPageNums() - 1) * getPageSizes();
    }

    @Override
    public Sort getSort() {
        return sort;
    }

    @Override
    public Pageable next() {
        return null;
    }

    @Override
    public Pageable previousOrFirst() {
        return null;
    }

    @Override
    public Pageable first() {
        return null;
    }

    @Override
    public boolean hasPrevious() {
        return false;
    }
}
